<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>添加子栏目</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <css file="__PUBLIC__/css/base.css"/>
    <link type="text/css" href="__ROOT__/data/ui/css/flick/jquery-ui-1.8.23.custom.css" rel="stylesheet" />
    <script type="text/javascript" src="__ROOT__/data/ui/js/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="__ROOT__/data/ui/js/jquery-ui-1.8.23.custom.min.js"></script>
    <jsconst/>
	<script type='text/javascript' src='__PUBLIC__/js/category.js'></script>
	<script type="text/javascript">
        $(function(){
            $("#tabs").tabs();
        })
    </script>

</head>
<body marginleft="10">
    <div class="now_path">
        <strong>您现在的位置：</strong>
        <empty value="{$hd.get.catid}">添加顶级栏目<noempty>添加子栏目</empty>
    </div>
    <form action="__CONTROL__/add_exe" method="post">
        <input type="hidden" name="pid" value="<empty value='$hd.get.catid'>0<noempty>{$hd.get.catid}</empty>"/>
        <div id="tabs">
            <ul>
                <li><a href="#tabs-1">基本内容</a></li>
                <li><a href="#tabs-2">生成静态规则</a></li>
                <li><a href="#tabs-3">模板设置</a></li>
				<li><a href='#tabs-4'>权限相关</a></li>
            </ul>
            <div id="tabs-1">
                <table class="table2">
                    <tr>
                        <th>栏目名称：</th>
                        <td><input type="text" name="cname" style="width:360px;"/></td>
                    </tr>
					<empty value='$_GET["catid"]'>
					<tr>
                        <th>采用模型：</th>
                        <td>
                        	<select name='mid'>
                        		<option value=''>--请选择模型--</option>
	                        	<foreach from='$models' value='$v'>
	                        		<option value='{$v.mid}'>{$v.mname}-{$v.title}</option>
	                        	</foreach>
							</select>
                        </td>
                    </tr>
					<noempty />
					<input type='hidden' name='mid' value='{$hd.get.mid}' />
					</empty>
                    <tr>
                        <th>目录名称：</th>
                        <td><input type="text" name="catdir" style="width:200px;"/>
                            <span class="desc"><font color="red">目录名称必须为英文</font></span></td>
                    </tr>
                    <tr>
                        <th>跳转url：</th>
                        <td><input type="text" name="gourl" style="width:260px;"/></td>
                    </tr>
                    <tr>
                        <th>是否显示：</th>
                        <td><input type="radio" name="isshow" value="1" checked="checked"/>是&nbsp;&nbsp;
                            <input type="radio" name="isshow" value="0"/>否</td>
                    </tr>
					<tr>
                        <th>排序：</th>
                        <td><input type="text" name="sort" value="0"/></td>
                    </tr>
                    <tr>
                        <th>关键字：</th>
                        <td><input type="text" name="keywords" style="width:300px;"/></td>
                    </tr>
                    <tr>
                        <th>描述：</th>
                        <td><textarea style="height:60px;width:90%" name="descroption"></textarea></td>
                    </tr>
                </table>
            </div>

            <div id="tabs-2">
                <table class="table2">
                    <tr>
                        <th>栏目生成静态：</th>
                        <td><input type="radio" name="iscathtml" value="1" checked="checked"/>是&nbsp;&nbsp;
                            <input type="radio" name="iscathtml" value="0"/>否</td>
                    </tr>
                    <tr>
                        <th>内容生成静态：</th>
                        <td><input type="radio" name="isconhtml" value="1" checked="checked"/>是&nbsp;&nbsp;
                            <input type="radio" name="isconhtml" value="0"/>否</td>
                    </tr>
                    <tr>
                        <th>栏目页静态规则：</th>
                        <td><input type="text" name="cathtml" style="width:360px;" value="{catdir}/{y}{m}{d}/{catid}_{page}.html"/>
                            <span class="desc">{catdir}栏目目录，{y}年{m}月{d}日{catid},栏目id,{page}页码</span></td>
                    </tr>
                    <tr>
                        <th>内容页静态规则：</th>
                        <td><input type="text" name="conhtml" style="width:360px;" value="{catdir}/{y}{m}{d}/{nid}.html"/>
                            <span class="desc">{catdir}栏目目录，{y}年{m}月{d}日{catid},栏目id,{page}页码</span></td>
                        </td>
                    </tr>
                </table>
            </div>

            <div id="tabs-3">
                <table class="table2">
                    <tr>
                        <th>封面模板：</th>
                        <td><input type="text" name="indextpl" style="width:360px;" value="{tpl}/news_index.html" id='indextpl'/>
						<a class="button2" tpltype="indextpl">选择模板</a>
						</td>
                    </tr>
                    <tr>
                        <th>列表页模板：</th>
                        <td><input type="text" name="listtpl" style="width:360px;" value="{tpl}/news_list.html" id='listtpl'/>
						<a class="button2" tpltype="listtpl">选择模板</a>
						</td>
                    </tr>
                    <tr>
                        <th>内容页模板：</th>
                        <td><input type="text" name="contpl" style="width:360px;" value="{tpl}/news_con.html" id='contpl'/>
						<a class="button2" tpltype="contpl">选择模板</a></td>
                    </tr>
                </table>
            </div>
			<div id='tabs-4'>
				<table class="table1">
                    <thead>
                    	<tr>
                    		<td width='100'>用户组角色</td>
							<td>权限管理</td>
                    	</tr>
                    </thead>
					<tbody>
						<tr>
							<td>后台用户组</td>
							<td>
								<table class='table2'>
									<thead>
										<tr>
											<td width='150'>用户组</td>
											<td>查看</td>
											<td>添加</td>
											<td>删除</td>
											<td>修改</td>
											<td>移动</td>
											<td>排序</td>
										</tr>
									</thead>
									<tbody>
										<foreach from='$admin' value='$v'>
											<tr>
												<td width='150'>{$v.rname}({$v.title})</td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},查看"/></td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},添加"/></td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},删除"/></td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},修改"/></td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},移动"/></td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},排序"/></td>
											</tr>
										</foreach>
									</tbody>
								</table>
							</td>
						</tr>
						<tr>
							<td>前台用户组</td>
							<td>
								<table class='table2'>
									<thead>
										<tr>
											<td width='150'>用户组</td>
											<td>前台查看</td>
											<td>前台投稿</td>
											<td>前台评论</td>
										</tr>
									</thead>
									<tbody>
										<foreach from='$user' value='$v'>
											<tr>
												<td width='150'>{$v.rname}({$v.title})</td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},前台查看"/></td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},前台投稿"/></td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},前台评论"/></td>
											</tr>
										</foreach>
									</tbody>
								</table>
							</td>
						</tr>
					</tbody>
                </table>
			</div>
            <div style="padding-left:100px;">
                <input type="submit" value="添加栏目" class="submit"/>
            </div>
        </div>
    </form>
	<div id="selecttemplate" class="dialog1 opacity90">
        <a href="#" id="closewindow" class="button1" style="display:block;width:60px;margin-left: 10px;">关闭窗口</a>
        <iframe src="" id="selecttplview" frameborder="0"></iframe>
    </div>
</body>
</html>
